def Ee(k):
    for i in range(2, int(k**0.5)+1):
        if k%i==0:
            break
    else:
        return k
s=0
a = list(input().split())
b = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
for i in a:
    if i not in b:
        print('Wrong input')
        break
for j in range(10):
    if a[0]==b[j]:
        s = 100*j
    if a[1]==b[j]:
        s = s+10*j
    if a[2]==b[j]:
        s=s+j
print(s)
